package com.youlu.campus.service.ranking;

import com.youlu.campus.entity.UserPO;
import com.youlu.campus.entity.VO.RankingListQueryVO;
import com.youlu.campus.entity.VO.req.RankingListResVO;
import com.youlu.campus.entity.VO.res.ActivityRankingPointsVO;
import com.youlu.campus.service.ranking.entity.UserActivityPointProvinceRanking;
import com.youlu.campus.service.ranking.entity.UserActivityPointProvinceRankingQueryVo;
import org.springframework.data.domain.Page;

public interface UserActivityPointRankingProvinceService {
    /**
     * 积分排行榜
     *
     * @param req
     * @param userPO
     * @return
     */
    RankingListResVO getUserTaskRanking(RankingListQueryVO req, UserPO userPO);

    /**
     * 更新积分
     *
     * @param userPO
     * @param activityId
     * @param point
     */
    void updatePoint(UserPO userPO, String activityId, Integer point);

    /**
     * 保存积分
     *
     * @param userPO
     * @param province
     * @param activityId
     * @param point
     */
    void saveQuantity(UserPO userPO, String province, String activityId, Double point);

    /**
     * 删除用户参加活动的贡献值榜单
     *
     * @param userId
     * @param activityId
     */
    Long deleteByUserIdAndActivityId(String userId, String activityId);

    /**
     * 查询积分数据
     *
     * @param userId
     * @param activityId
     * @return
     */
    UserActivityPointProvinceRanking find(String userId, String province, String activityId);

    /**
     * 查询积分数据列表
     *
     * @param req
     * @return
     */
    Page<UserActivityPointProvinceRanking> findByProvince(RankingListQueryVO req);

    String getRankKey(String activityId, String province);

    /**
     * 分页查询
     *
     * @param queryVo
     * @return
     */
    Page<ActivityRankingPointsVO> findByPage(UserActivityPointProvinceRankingQueryVo queryVo);

    /**
     * 更新排行榜
     *
     * @param activityId
     */
    void updateUser(String activityId);
}
